﻿@model WebUI.Models.QizSubjectDefine
@using (Ajax.BeginForm(new AjaxOptions()
{
    LoadingElementId = "OnLoadingSpan",
    UpdateTargetId = ViewBag.utid,
    InsertionMode = System.Web.Mvc.Ajax.InsertionMode.Replace,
    HttpMethod = "Post",
    OnSuccess = "$('#dialogbox').dialog('close');",
    OnFailure = "OnSiteError"
}))
{
    @Html.HiddenFor(model => model.ID)
    <h3>@Model.QizItem.Title [类型-@Model.QizItem.TypeRef.OptionTitle]
    </h3>
    <div class="editor-label">
        自动诊断正常值范围:
    </div>
    <div class="editor-field">
        @if (Model.QizItem.TypeRef.OptionValue == "2")
        {
            <text> 从：@Html.TextBox("Low", Model.ThresholdLow) 至：@Html.TextBox("High", Model.ThresholdHight)
            </text>
        }
        @*else if (Model.QizItem.TypeRef.OptionValue == "4")
        {
            @Html.DropDownList("Low", new SelectList(Model.QizItem.EnumDefine.EnumValues, "EnumValID", "OptionTitle", Model.ThresholdLow), "无", null)
        }*@
        else if (Model.QizItem.TypeRef.OptionValue == "5" || Model.QizItem.TypeRef.OptionValue == "4")
        {

            foreach (var item in Model.QizItem.EnumDefine.EnumValues)
            {
            <div>
                @if (Model.ThresholdLow != null && Model.ThresholdLow.Contains(item.EnumValID))
                {
                    <input type="checkbox" name="MulitSeletion" checked="checked" value="@item.EnumValID" />
                }
                else
                {
                    <input type="checkbox" name="MulitSeletion" value="@item.EnumValID" />
                }
                @Html.Label(item.OptionTitle)
            </div>  
            }
        }
    </div>
    <div class="editor-label">
        异常常规建议:
    </div>
    <div>
        @Html.TextAreaFor(m => Model.YiChangTiXing, 5, 60, new { })
    </div>
    <p>
        <input class="ui-button" type="submit" value="保存" />
    </p>
    
}